
export function vulnerabilityLevelEscape(type){
  switch (String(type)) {
    case '0': return {
      color: 'red',
      text: '超危'
    }
    case '1': return {
      color: 'volcano',
      text: '高危'
    }
    case '2': return {
      color: 'orange',
      text: '中危'
    }
    case '3': return {
      color: 'gold',
      text: '低危'
    }
    case '4': return {
      color: 'purple',
      text: '安全'
    }
    default: {
      return {
        color: 'default',
        text: '未定义'
      }
    }
  }
}
export function vulnerabilityDisposalPriorityEscape(type){
  switch (String(type)) {
    case '1': return {
      color: 'red',
      text: '高优先级'
    }
    case '2': return {
      color: 'cyan',
      text: '中高优先级'
    }
    case '3': return {
      color: '#2b85e4',
      text: '中优先级'
    }
    case '4': return {
      color: 'orange',
      text: '中低优先级'
    }
    case '5': return {
      color: 'purple',
      text: '低优先级'
    }
    default: {
      return {
        color: 'default',
        text: '未定义'
      }
    }
  }
}
export function  bugStatusEscape(type) {
  switch (String(type)) {
    case '1': return {
      color: 'red',
      text: '发现'
    }
    case '2': return {
      color: 'cyan',
      text: '已复测'
    }
    case '3': return {
      color: 'purple',
      text: '已关闭'
    }
    case '4': return {
      color: 'orange',
      text: '确认关闭'
    }
    case '0': return {
      color: '#5cadff',
      text: '待验证'
    }
    case '5': return {
      color: 'cyan',
      text: '待修复'
    }
    case '7': return {
      color: 'orange',
      text: '开启修复'
    }
    case '8': return {
      color: 'purple',
      text: '修复成功'
    }
    case '10': return {
      color: 'orange',
      text: '复测中'
    }
    case '20': return {
      color: 'purple',
      text: '复测通过'
    }
    case '21': return {
      color: 'red',
      text: '复测不通过'
    }
    case '22': return {
      color: '#515a6e',
      text: '问题不存在'
    }
    default: {
      return {
        color: 'default',
        text: '未定义'
      }
    }
  }
}
export function vulnerabilityStatusEscape(type) {
  switch (String(type)) {
    case '1': return {
      color: 'red',
      text: '发现'
    }
    case '2': return {
      color: 'cyan',
      text: '已复测'
    }
    case '3': return {
      color: 'purple',
      text: '已修复'
    }
    case '4': return {
      color: 'orange',
      text: '确认修复'
    }
    case '0': return {
      color: '#5cadff',
      text: '待验证'
    }
    case '5': return {
      color: 'cyan',
      text: '待修复'
    }
    case '7': return {
      color: 'orange',
      text: '开启修复'
    }
    case '8': return {
      color: 'purple',
      text: '修复成功'
    }
    case '10': return {
      color: 'orange',
      text: '复测中'
    }
    case '20': return {
      color: 'purple',
      text: '复测通过'
    }
    case '21': return {
      color: 'red',
      text: '复测不通过'
    }
    case '22': return {
      color: '#515a6e',
      text: '问题不存在'
    }
    default: {
      return {
        color: 'default',
        text: '未定义'
      }
    }
  }
}

// 外部链接类型转义
export function projectStatusEscape(type) {
  type = type === null ? 18 : type
  switch(type) {
      case 0: return {
          color: '#2db7f5',
          text: '未部署'
      }
      case 1: return {
          color: '#2b85e4',
          text: '部署中'
      }
      case 2: return {
          color: '#cddc39',
          text: '待部署'
      }
      case 3: return {
          color: '#8bc34a',
          text: '部署成功'
      }
      case 4: return {
          color: '#19be6b',
          text: '删除中'
      }
      case 5: return {
          color: '#c62828',
          text: '已修改'
      }
      case 6: return {
          color: '#ed4014',
          text: '部署失败'
      }
      case 7: return {
          color: '#ff9900',
          text: '修改错误'
      }
      case 8: return {
          color: '#2db7f5',
          text: '删除失败'
      }
      case 9: return {
          color: '#2b85e4',
          text: '部署中'
      }
      case 10: return {
          color: '#cddc39',
          text: '未绑定工程'
      }
      case 11: return {
          color: '#8bc34a',
          text: '修改失败'
      }
      case 12: return {
          color: '#19be6b',
          text: '待删除'
      }
      case 13: return {
          color: '#c62828',
          text: '清空部署中'
      }
      case 14: return {
          color: '#ed4014',
          text: '清空部署失败'
      }
      case 15: return {
          color: '#ff9900',
          text: '部署校验中'
      }
      case 16: return {
          color: '#2db7f5',
          text: '工程导入中'
      }
      case 17: return {
          color: '#2b85e4',
          text: '工程导入失败'
      }
      case 18: return {
          color: '#cddc39',
          text: '已删除'
      }
      default: {
          return {
              color: 'default',
              text: '未定义'
          }
      }
  }
}